package com.game.src.main;

import java.awt.Graphics;
import java.awt.image.BufferedImage;

public class Bullet {

	private double x;
	private double y;
	
	private double speedx;
	private double speedy;
	
	
	private int damage = 10;

	private Textures tex;

	public Bullet(double x, double y, Textures tex) {
		this.x = x;
		this.y = y;
		this.tex = tex;
		speedx = 0;
		speedy = 10;

	}
	
	public Bullet(double x, double y, Textures tex, double speedx, double speedy){
		this(x,y,tex);
		this.speedx = speedx;
		this.speedy = speedy;
		
	}

	public void tick() {
		x += speedx;
		y -= speedy;
	}

	public void render(Graphics g) {
		g.drawImage(tex.bullet, (int) x, (int) y, null);
	}

	public double getY() {
		return y;
	}

	/**
	 * @return the x
	 */
	public double getX() {
		return x;
	}

	/**
	 * @return the damage
	 */
	public int getDamage() {
		return damage;
	}

	/**
	 * @param damage the damage to set
	 */
	public void setDamage(int damage) {
		this.damage = damage;
	}
}
